Add ability to turn off info page generation #1237
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for explicitly disabling info page generation by setting
createInfoPageMD: falsein themarkdownGeneratorsconfiguration.Changes
MarkdownGeneratorinterface to allowcreateInfoPageMDto bebooleanin addition to a functionbooleanas a valid value forcreateInfoPageMDopenapi.tsto skip info page creation whencreateInfoPageMDis explicitly set tofalseindex.tsto properly handle boolean values - whentrueorundefined, use default generator; whenfalse, skip generation; when function, use custom generatorExpected Behavior
When
createInfoPageMDis set inmarkdownGenerators:false→ Info pages (.info.mdxfiles) will not be generatedtrue→ Explicitly enable info pages with default generator (same asundefined)function→ Use custom generator functionundefined(not set) → Use default generatorUsage Example
Or to explicitly enable with default:
Edge Cases Handled
createInfoPageMD: falseandcategoryLinkSource: "info"are both set, categories gracefully degrade to spindown behavior (collapsible folders without links)infoTemplateoption has no effect when info page generation is disabledMotivation and Context
Solves: #1103
How Has This Been Tested?
Locally tested. Enabled setting on different specs on & off and observed the info page not being generated. We have also tested the edge case described above when
categoryLinkSourceis set toinfo.Additional notes: We could potentially add custom validation to fail build when category source is set to
infoand info pages are disabled.Types of changes
Checklist